<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/7/18
  Time: 14:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Charts</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-1.11.3.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/highcharts.js"></script>
    <script type="text/javascript" src="js/exporting.js"></script>
</head>
<body>

<div class="container-fluid">

    <br/>
<div class="row">
    <div class="col-md-8 col-md-offset-2" id="container" style="max-width: 60%;height: 400px;"></div>
</div>

    <br/>
    <br/>

        <div class="btn-group" role="group" aria-label="..." style="margin-left: 47%">
            <a type="button" class="btn btn-primary" href="Step2.jsp"> 返回步骤2 </a>
        </div>
    </div>
    <br/>
    <br/>
</div>



</body>

<script type="text/javascript">

    var options = {
        chart:{
            type:"line"
        },
        title:{
            text:"优化效果图"
        },
        xAxis:{
            title:{
                text:"数据序号"
            },
            //categories:["优化前","优化后"]
        },
        yAxis:{
            title:{
                text:"沉降值"
            }
        },
        series:[
            {
                name:"优化前",
                data:${sessionScope.Inference_Result},
                color:"#7cb5ec"
            },
            {
                name:"优化后",
                data:${sessionScope.pso_result},
                color:"#90ed7d"
            }
        ],
        credits:{
            enabled:false
        },
        exporting:{
            enabled:true,
            filename:'optimization_fig',
            url:"http://export.highcharts.com.cn ",
            type:'image/png',
            width:800
        }
    }
    $("#container").highcharts(options);
    //图表初始化
    //var chart = Highcharts.chart("container",options);
    //$("#container").highcharts(options);


</script>

</html>
